#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {
    int f[31];
    f[0] = 0;
    f[1] = 1;
    int n = 0;
    scanf("%d", &n);
    int sum = 0;
    for (int i = 2; i < n; i++) {
        f[i] = f[i - 1] + f[i - 2];
    }
    sum = f[n - 1] + f[n - 2];
    printf("%d", sum);
    return 0;
}